home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL-GLC / glcgetstringcharmetric.z / glcgetstringcharmetric
Encoding:
Text File  |  2002-10-03  |  8.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ggggllllccccGGGGeeeettttSSSSttttrrrriiiinnnnggggCCCChhhhaaaarrrrMMMMeeeettttrrrriiiicccc((((3333GGGG))))                           OOOOppppeeeennnnGGGGLLLL CCCChhhhaaaarrrraaaacccctttteeeerrrr RRRReeeennnnddddeeeerrrreeeerrrr
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllccccGGGGeeeettttSSSSttttrrrriiiinnnnggggCCCChhhhaaaarrrrMMMMeeeettttrrrriiiicccc - retrieve character metric from measurement
  10.      buffer
  11.  
  12.  
  13. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  14.      GLfloat* ggggllllccccGGGGeeeettttSSSSttttrrrriiiinnnnggggCCCChhhhaaaarrrrMMMMeeeettttrrrriiiicccc( GLint _i_n_I_n_d_e_x,
  15.                                       GLCenum _i_n_M_e_t_r_i_c,
  16.                                       GLfloat *_o_u_t_V_e_c )
  17.  
  18.  
  19. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  20.      _i_n_I_n_d_e_x   Specifies which element in the string to measure.
  21.  
  22.      _i_n_M_e_t_r_i_c  Specifies the metric to measure, either GGGGLLLLCCCC____BBBBAAAASSSSEEEELLLLIIIINNNNEEEE or
  23.                GGGGLLLLCCCC____BBBBOOOOUUUUNNNNDDDDSSSS.
  24.  
  25.      _o_u_t_V_e_c    Specifies a vector in which to store value of _i_n_M_e_t_r_i_c for the
  26.                specified character.
  27.  
  28.  
  29. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  30.      ggggllllccccGGGGeeeettttSSSSttttrrrriiiinnnnggggCCCChhhhaaaarrrrMMMMeeeettttrrrriiiicccc retrieves a character metric from the GLC
  31.      measurement buffer and stores it in _o_u_t_V_e_c. To store a string in the
  32.      measurement buffer, call ggggllllccccMMMMeeeeaaaassssuuuurrrreeeeCCCCoooouuuunnnntttteeeeddddSSSSttttrrrriiiinnnngggg or ggggllllccccMMMMeeeeaaaassssuuuurrrreeeeSSSSttttrrrriiiinnnngggg.
  33.  
  34.      The position of the character to measure is specified by _i_n_I_n_d_e_x.  The
  35.      metric, either GGGGLLLLCCCC____BBBBAAAASSSSEEEELLLLIIIINNNNEEEE or GGGGLLLLCCCC____BBBBOOOOUUUUNNNNDDDDSSSS, is specified by _i_n_M_e_t_r_i_c.
  36.  
  37.      If the command does not raise an error, its return value is _o_u_t_V_e_c. If
  38.      _i_n_M_e_t_r_i_c is  GGGGLLLLCCCC____BBBBOOOOUUUUNNNNDDDDSSSS, the vector returned in _o_u_t_V_e_c starts in the
  39.      lower left corner and continues in a counterclockwise direction.
  40.  
  41. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  42.      The following example first calls ggggllllccccMMMMeeeeaaaassssuuuurrrreeeeSSSSttttrrrriiiinnnngggg to store the string
  43.      "hello" in the measurement buffer. It then retrieves both the baseline
  44.      and the bounding box for the whole string, then for each individual
  45.      character.
  46.  
  47.      _GGGG_LLLL_ffff_llll_oooo_aaaa_tttt _oooo_vvvv_eeee_rrrr_aaaa_llll_llll_BBBB_aaaa_ssss_eeee_llll_iiii_nnnn_eeee_[[[[_4444_]]]]_;;;;
  48.      _GGGG_LLLL_ffff_llll_oooo_aaaa_tttt _oooo_vvvv_eeee_rrrr_aaaa_llll_llll_BBBB_oooo_uuuu_nnnn_dddd_iiii_nnnn_gggg_BBBB_oooo_xxxx_[[[[_8888_]]]]_;;;;
  49.  
  50.      _GGGG_LLLL_ffff_llll_oooo_aaaa_tttt _cccc_hhhh_aaaa_rrrr_BBBB_aaaa_ssss_eeee_llll_iiii_nnnn_eeee_ssss_[[[[_4444_]]]]_[[[[_5555_]]]]_;;;;
  51.      _GGGG_LLLL_ffff_llll_oooo_aaaa_tttt _cccc_hhhh_aaaa_rrrr_BBBB_oooo_uuuu_nnnn_dddd_iiii_nnnn_gggg_BBBB_oooo_xxxx_eeee_ssss_[[[[_8888_]]]]_[[[[_5555_]]]]_;;;;
  52.  
  53.      _GGGG_LLLL_iiii_nnnn_tttt _iiii_;;;;
  54.  
  55.      _gggg_llll_cccc_MMMM_eeee_aaaa_ssss_uuuu_rrrr_eeee_SSSS_tttt_rrrr_iiii_nnnn_gggg_((((_GGGG_LLLL______TTTT_RRRR_UUUU_EEEE_,,,, _""""_hhhh_eeee_llll_llll_oooo_""""_))))_;;;;
  56.  
  57.      _gggg_llll_cccc_GGGG_eeee_tttt_SSSS_tttt_rrrr_iiii_nnnn_gggg_MMMM_eeee_tttt_rrrr_iiii_cccc_((((_GGGG_LLLL_CCCC______BBBB_AAAA_SSSS_EEEE_LLLL_IIII_NNNN_EEEE_,,,, _oooo_vvvv_eeee_rrrr_aaaa_llll_llll_BBBB_aaaa_ssss_eeee_llll_iiii_nnnn_eeee_))))_;;;;
  58.      _gggg_llll_cccc_GGGG_eeee_tttt_SSSS_tttt_rrrr_iiii_nnnn_gggg_MMMM_eeee_tttt_rrrr_iiii_cccc_((((_GGGG_LLLL_CCCC______BBBB_OOOO_UUUU_NNNN_DDDD_SSSS_,,,, _oooo_vvvv_eeee_rrrr_aaaa_llll_llll_BBBB_oooo_uuuu_nnnn_dddd_iiii_nnnn_gggg_BBBB_oooo_xxxx_))))_;;;;
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggllllccccGGGGeeeettttSSSSttttrrrriiiinnnnggggCCCChhhhaaaarrrrMMMMeeeettttrrrriiiicccc((((3333GGGG))))                           OOOOppppeeeennnnGGGGLLLL CCCChhhhaaaarrrraaaacccctttteeeerrrr RRRReeeennnnddddeeeerrrreeeerrrr
  71.  
  72.  
  73.  
  74.      _ffff_oooo_rrrr _((((_iiii _==== _0000 _;;;; _iiii _<<<< _5555 _;;;; _++++_++++_iiii_)))) _{{{{
  75.          _gggg_llll_cccc_GGGG_eeee_tttt_SSSS_tttt_rrrr_iiii_nnnn_gggg_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_((((_iiii_,,,, _GGGG_LLLL_CCCC______BBBB_AAAA_SSSS_EEEE_LLLL_IIII_NNNN_EEEE_,,,, _cccc_hhhh_aaaa_rrrr_BBBB_aaaa_ssss_eeee_llll_iiii_nnnn_eeee_ssss_[[[[_iiii_]]]]_))))_;;;;
  76.          _gggg_llll_cccc_GGGG_eeee_tttt_SSSS_tttt_rrrr_iiii_nnnn_gggg_CCCC_hhhh_aaaa_rrrr_MMMM_eeee_tttt_rrrr_iiii_cccc_((((_iiii_,,,, _GGGG_LLLL_CCCC______BBBB_OOOO_UUUU_NNNN_DDDD_SSSS_,,,, _cccc_hhhh_aaaa_rrrr_BBBB_oooo_uuuu_nnnn_dddd_iiii_nnnn_gggg_BBBB_oooo_xxxx_eeee_ssss_[[[[_iiii_]]]]_))))_;;;;
  77.      _}}}}
  78.  
  79. NNNNOOOOTTTTEEEESSSS
  80.      ggggllllccccGGGGeeeettttSSSSttttrrrriiiinnnnggggCCCChhhhaaaarrrrMMMMeeeettttrrrriiiicccc is useful if you're interested in the metric of a
  81.      character as it appears in a string, that is, influenced by kerning,
  82.      ligatures, and so on. To measure a character as if it started at the
  83.      origin, call ggggllllccccGGGGeeeettttCCCChhhhaaaarrrrMMMMeeeettttrrrriiiicccc.
  84.  
  85. EEEERRRRRRRROOOORRRRSSSS
  86.      GGGGLLLLCCCC____PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR____EEEERRRRRRRROOOORRRR is generated if _i_n_I_n_d_e_x is less than zero or is
  87.      greater than or equal to the value of the variable
  88.      GGGGLLLLCCCC____MMMMEEEEAAAASSSSUUUURRRREEEEDDDD____CCCCHHHHAAAARRRR____CCCCOOOOUUUUNNNNTTTT.
  89.  
  90. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  91.      ggggllllccccGGGGeeeettttCCCChhhhaaaarrrrMMMMeeeettttrrrriiiicccc, ggggllllccccGGGGeeeettttMMMMaaaaxxxxCCCChhhhaaaarrrrMMMMeeeettttrrrriiiicccc, ggggllllccccMMMMeeeeaaaassssuuuurrrreeeeCCCCoooouuuunnnntttteeeeddddSSSSttttrrrriiiinnnngggg,
  92.      ggggllllccccMMMMeeeeaaaassssuuuurrrreeeeSSSSttttrrrriiiinnnngggg
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.